// <copyright file="SpaceRockGame.cs" company="SpaceRock Team Members">
// Project: SpaceRock
// File: SpaceRockGame.cs (6,09 KB, 194 lines)
// Creation date: 2010-05-28 12:40
// Last modified: 2010-05-28 15:19
// </copyright>

#region Using directives
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using SpaceRockTeam.SpaceRock.Components;
using System;
using System.Collections.Generic;
using System.Linq;
using XnaGameFramework.GameStateManagement;
#endregion

namespace SpaceRockTeam.SpaceRock
{
    /// <summary>
    /// This is the main type for your game
    /// </summary>
    public class SpaceRockGame : Microsoft.Xna.Framework.Game
    {
        /// <summary>
        /// Graphics
        /// </summary>
        private GraphicsDeviceManager graphics;

        /// <summary>
        /// Screen manager
        /// </summary>
        private ScreenManager screenManager;

        /// <summary>
        /// Create space rock game
        /// </summary>
        public SpaceRockGame()
        {
            graphics = new GraphicsDeviceManager(this);
            graphics.MinimumPixelShaderProfile = ShaderProfile.PS_2_0;
            Content.RootDirectory = "Content";

            InitResolution();

            // Create the screen manager component.
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            // Activate the first screens.
            screenManager.AddScreen(new BackgroundScreen(), null);
            screenManager.AddScreen(new MainMenuScreen(), null);
        } // SpaceRockGame

        /// <summary>
        /// Init resolution
        /// </summary>
        private void InitResolution()
        {
            graphics.PreferredBackBufferWidth = 1280;
            graphics.PreferredBackBufferHeight = 720;
        } // InitResolution

        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);
            base.Draw(gameTime);
        } // Draw
    } // class SpaceRockGame
} // namespace SpaceRockTeam.SpaceRock
